package com.efast.dmom.mes.dao.entity;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.efast.dmom.mes.bean.WmsOutWarehouseOrder;
import com.efast.dmom.mes.bean.WmsStorage;
import com.efast.dmom.mes.entity.PartEntity;
import com.efast.dmom.mes.entity.WmsWarehouseBasEntity;

public interface WmsStorageDao {
	
	public int save(WmsStorage wmsStorage);
	
	public int batchSave(List<WmsStorage> list);
	
	public int updateQuality(WmsStorage wmsStorage);
	
	public int updateData(WmsStorage wmsStorage);
	
	public int batchUpdateQuality(List<WmsStorage> list);
	
	public List<WmsStorage> selectByWarehouseAndPart(WmsStorage wmsStorage);
	
	
	public WmsStorage selectById(WmsStorage wmsStorage);
	
	public List<WmsOutWarehouseOrder> checkStorageEnough(WmsOutWarehouseOrder wmsOutWarehouseOrder);
	
	public int getByWarehouseId(long warehouseId);
	
	public int deleteWarehouseById(WmsStorage wmsStorage);

	public WmsStorage getWmsStorageByPartId(@Param("blankPiecePartId") long blankPiecePartId,@Param("warehouseId") long warehouseId);

	public void updateStorage(WmsStorage wmsStorage);

	public List<PartEntity> getPartEntityList(long warehouseBasId);
	
	/**
	 * 仓库信息主数据保存
	 * @param warehouseNo
	 * @return
	 */

	public WmsWarehouseBasEntity getByCode(String warehouseNo);

	public WmsWarehouseBasEntity getByName(String warehouseName);

	public void saveWarehouse(WmsWarehouseBasEntity wmsWarehouseBasEntity);

	public WmsWarehouseBasEntity getById(long id);

	public void updateWarehouseBasEntity(WmsWarehouseBasEntity wmsWarehouseBasEntity);
	
	public List<WmsStorage> selectByWarehouseNoAndPart(WmsStorage wmsStorage);
	
	
	public Integer selectIdByNo(String warehouseNo);
	

}
